<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Shop.Master" Inherits="Shop.Framework.Page.CategoryViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <title>Categories</title>

    <script type="text/javascript">
	    //create list for tag links
	    $(document).ready(function(){
	        data = ({tags: <%=CategoriesJSON %>});
	        $("<ul>").attr("id", "tagList").appendTo("#tagCloud");
            
	        //create tags
	        
	        $.each(data.tags, function(i, val) {

	            //create item
	            var li = $("<li>");

	            //create link
	            $("<a>").text(val.tag).attr({ title: "See all products from " + val.tag, href: val.link }).appendTo(li);
	            li.children().css("fontSize", (val.freq / 10 < 1) ? val.freq / 10 + 1 + "em" : (val.freq / 10 > 2) ? "2em" : val.freq / 10 + "em");
	            //add to list
	            li.appendTo("#tagList");
	        });
	    });
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="padding:50px;">
        <div id="tagCloud">
            <img src="/images/cloud.gif" alt="na"><h2>
                Select a Category</h2>
        </div>
    </div>
</asp:Content>
